package perucuy.struts;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ActionServlet extends org.apache.struts.action.ActionServlet {

	/**
	 * 
	 */
//	private static final long serialVersionUID = -3113882298883375943L;

	@Override
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		cambiar(request);
		super.doGet(request, response);
	}

	private void cambiar(HttpServletRequest request) throws IOException {
		if (request.getCharacterEncoding() == null)
			request.setCharacterEncoding("utf-8");

	}

	@Override
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		cambiar(request);
		// TODO Auto-generated method stub
		super.doPost(request, response);
	}

}
